//
//  CreateControl.m
//  NBAPro
//
//  Created by 李广松 on 16/6/27.
//  Copyright © 2016年 WYH. All rights reserved.
//

#import "CreateControl.h"

@implementation CreateControl

+ (UIButton *)createButtonWithFrame:(CGRect)frame AndText:(NSString *)text AndTextColor:(UIColor *)textColor AndBackgroundColor:(UIColor *)backgroundColor AndTextFont:(float)font {
    
    UIButton *button = [[UIButton alloc] initWithFrame:frame];
    [button setTitle:text forState:UIControlStateNormal];
    [button setTitleColor:textColor forState:UIControlStateNormal];
    [button setBackgroundColor:backgroundColor];
    button.titleLabel.font = [UIFont systemFontOfSize:font];
    
    return button;
    
}

+ (UILabel *)createLabelWithFrame:(CGRect)frame AndText:(NSString *)text AndTextColor:(UIColor *)textColor AndBackgroundColor:(UIColor *)backgroundColor AndTextFont:(float)font {
    
    UILabel *label = [[UILabel alloc] initWithFrame:frame];
    label.text = text;
    label.textColor = textColor;
    label.font = [UIFont systemFontOfSize:font];
    label.backgroundColor = backgroundColor;
    label.textAlignment = NSTextAlignmentCenter;
    
    return label;
}


@end
